package cn.bearspark.currency.provider.key;

import cn.bearspark.framework.redis.starter.key.RedisKeyBuilder;
import org.springframework.stereotype.Component;

/**
 * 货币模块中 redis 缓存键的构造器
 *
 * @author f
 */
@Component
public class CurrencyCacheKeyBuilder extends RedisKeyBuilder {

    /**
     * 货币基础信息缓存的键的前缀
     */
    private static final String CURRENCY_BASE_INFO = "currencyBaseInfo";

    public String buildCurrencyBaseInfoKey(long userId) {
        return super.getPrefix() + CURRENCY_BASE_INFO + super.getSplitItem() + userId;
    }

}
